Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Fix morphTo attempting to map an empty string morph type to an instance #35824

Merged

Conversation

rhysemmerson
Copy link
Contributor

After upgrading to 8 our morphTo relations started throwing exceptions.

#35364 allowed mapping literal 0 in morphType, this was backported to 6.x and 7.x with an additional check to not attempt to map an empty string to a type (#35487). This PR adds the empty string check into 8.x.

@GrahamCampbell GrahamCampbell changed the title Fix morphTo attempting to map an empty string morph type to an instance [8.x] Fix morphTo attempting to map an empty string morph type to an instance Jan 8, 2021
@taylorotwell taylorotwell merged commit 74bb56a into laravel:8.x Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants